#!/usr/bin/env python
# -*- coding:utf-8 -*-

'''
    shutil学习01
    2017-1-18 姚彧 创建
'''

import shutil
import os

print(os.path.lexists(r'E:\Temp\test_log\bot_30304.log'))
print(os.path.lexists(r'E:\Temp\test_log'))

def publish_files(src, dests):
    for dest in dests:
        print(dest)
        shutil.copytree(src, dst, symlinks=False, ignore=None, 
                       copy_function=copy2, 
                       ignore_dangling_symlinks=False)
        #if os.path.isfile(dest):
            #os.remove(dest)
        #elif os.path.isdir(dest):
            #shutil.rmtree(dest)
        #if os

#publish_files(r'E:\Temp\test_log', [r'E:\Temp\test_log2'])
#shutil.copytree(r'E:\Temp\test_log', r'Y:\thrift\接口发布\test_log2')